import { create } from 'zustand';

interface StoreState {
  isNavbarSticky: boolean;
  isMenuOpen: boolean;
  setNavbarSticky: (isSticky: boolean) => void;
  toggleMenu: () => void;
  closeMenu: () => void;
}

const useStore = create<StoreState>((set) => ({
  isNavbarSticky: false,
  isMenuOpen: false,
  setNavbarSticky: (isSticky: boolean) => set({ isNavbarSticky: isSticky }),
  toggleMenu: () => set((state) => ({ isMenuOpen: !state.isMenuOpen })),
  closeMenu: () => set({ isMenuOpen: false }),
}));

export default useStore;